package com.goodving.guli.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import com.goodving.guli.R;
import com.goodving.guli.bt.profile.scale.GuliLog;
import com.goodving.guli.bt.profile.scale.ScaleWeightInfo;

/**
 * Created by john on 2015/12/9.
 */
public class MemberInfoBaseActivity extends SystemBarTintActivity implements View.OnClickListener {
    protected static final String TAG = "MemberInfoBaseActivity";
    public static final String USER_INFO_UID = "USER_INFO_UID";
    public static final String setVisitorMode = "set_visitor_mode";
    public static final String weightChooseUser = "weight_choose_user";
    protected boolean isVisitorMode;
    protected boolean isWeightChooseUser;
    protected ScaleWeightInfo f11393g;
    private View prevBut;
    private View nextBut;

    public MemberInfoBaseActivity() {
        this.prevBut = null;
        this.nextBut = null;
        this.isVisitorMode = false;
        this.isWeightChooseUser = false;
    }

    protected void m15808b() {
        this.prevBut = findViewById(R.id.right_button);
        this.prevBut.setOnClickListener(this);
        this.nextBut = findViewById(R.id.left_button);
        this.nextBut.setOnClickListener(this);
    }

    public void onCancel() {
        GuliLog.tracePrintInfo(TAG, "onCancel");
        setResult(0);
        finish();
    }

    public void onConfirm() {
    }

    protected void onActivityResult(int i, int i2, Intent intent) {
        super.onActivityResult(i, i2, intent);
        GuliLog.tracePrintInfo(TAG, "onActivityResult ");
        if (i != 6) {
            return;
        }
        if (i2 == -1) {
            setResult(-1, intent);
            finish();
        } else if (i2 == 0) {
            setResult(0);
        }
    }

    public void onBackPressed() {
        onCancel();
    }

    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.left_button:
                onCancel();
                break;
            case R.id.right_button:
                onConfirm();
                break;
            default:
                break;
        }
    }

    protected void onCreate(Bundle bundle) {
        super.onCreate(bundle);
    }

    protected void onDestroy() {
        super.onDestroy();
    }
}
